﻿namespace OasisCiq.Xpil
{
    using System;
    using System.Linq;

    /// <summary>
    /// List of information types used for describing an occupation
    /// </summary>
    public class OccupationElementList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[] 
        {
            "Role", // The actual role the person carries out.
            "PositionTitle",
            "ReportsTo", // Name, role or position who the person reports to.
            "EmploymentType", // E.g. full-time, part-time, temporary, contract, etc.
            "CostCentre", // Commonly used identifier for accounting purposes.
            "Rank" // A rank in some ranking system, e.g. private, major, superintendant, Justice, etc.This is different from role
        };

        public OccupationElementList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}